<template>
    <div class="add">
      <div class="text">
          <div style="margin-left:10px">新增</div>
          <div class="edit">
              <div  @click="router.go(-1)">返回</div>
              <div  @click="save">保存</div>
          </div>
      </div>
  
      <div class="form">
          <div>
              报销人：&nbsp;&nbsp;&nbsp;<input type="text" v-model="name">
          </div>
          <div>
              报销类型：<select name="" id="" v-model="type">
                  <option value="">打车</option>
                  <option value="">餐费</option>
                  <option value="">未报销</option>
                  <option value="">其他费用</option>
              </select>
          </div>
          <div>
              报销时间：<input type="text" v-model="date">
          </div>
          <div>
              报销金额：<input type="text" v-model="money">
          </div>
          <div>
              报销说明：<input type="text" v-model="stus">
          </div>
      </div>
    </div>
  </template>
  
  <script setup>
  import axios from "axios"
  import { ref } from "vue"
  import { useRouter, useRoute } from 'vue-router'
  var router = useRouter()
  var route = useRoute()
  var name = ref("")
  var date =ref()
  var money =ref()
  var stus = ref("")
  
  var a =ref([])
  
  var save = () => {
      axios.post("/api/user_money/personadd", { name: name.value, date: date.value, money: money.value, stus: stus.value }).then((res) => {
          alert("保存成功！")
  
      })
   
  }
   
  
  
  
  
  
  
  </script>
  
  <style lang="scss">
  .add{
      border: 1px solid #e4e4e4;
  }
  
  .text{
      display: flex;
      width: 1328px;
      justify-content: space-between;
      background: #f2f2f2;
      height: 50px;
      align-items: center;
      color: #000;
      // margin-left: -5px;
      margin-bottom: 20px;
     
  
  }
  .edit{
      display: flex;
      justify-content: space-between;
      width: 150px;
      margin-left: 50px;
      font-size: 14px;
      div{
          width: 100px;
          height: 40px;
          line-height: 40px;
          text-align: center;
          color: #63c8e0;
          font-size: 12px;
          background: white;
          margin-right: 20px;
          cursor: pointer;
      }    
  }
  .form div{
      margin-bottom: 20px;
      margin-left: 20px;
      font-size: 14px;
      input{
          width: 120px;
          height: 40px;
          border-radius: 10px;
          outline: none;
          border: 1px solid #63c8e0;
      }
  }
  
   </style>